<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2023-01-12 14:17:40
 * @Last Modified time: 2023-01-13 14:14:23
 */

namespace app\common\dao\user;

use app\common\model\user\UserModel;
use frank\base\BaseDao;
/**
 * 用户
 * Class UserDao
 * @package app\common\dao\user
 */
class UserDao extends BaseDao
{
    /**
     * 设置模型
     */
    protected function setModel(): string
    {
        return UserModel::class;
    }

    public function getUserList(array $where = [], int $page, int $limit,?array $with = [])
    {
        return $this->search($where)->with($with)->order('id DESC')->page($page)->paginate($limit)->toArray();
    }
    
}
